"use strict";

var div = document.createElement("div");
div.id = "loading";　　　　
div.innerHTML = [
	'<div class="icon">',
//	'	<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>',
	'	<img src="image/loading.gif" />',
	'</div>',
	'<div id="loadingText">页面正在努力加载中，请您稍候 ......</div>'
].join('');　　　　

document.body.insertBefore(div, document.body.firstElementChild);

//loadStyle('lib/font-awesome/css/font-awesome.min.css');
loadStyle('css/loading.css');

function loadStyle(url) {
	var link = document.createElement('link');
	link.type = 'text/css';
	link.rel = 'stylesheet';
	link.href = url;
	var head = document.getElementsByTagName('head')[0];
	head.appendChild(link);
}